import React from 'react'
import {
	Text, View
} from "react-native";
import { styles } from '../../_common/style';
import { PlayListPage } from '../../../create/_components/PlayListPage.js';
//交货计划
export const DeliveryPlanSection = (props) => {
	const { data, title } = props;

	if (data && data.length) {
		return (
			<View style={[styles.itemBox, styles.borders]}>
				<Text style={styles.itemTitle}>{title ? title : '交货计划'}</Text>{
					data.map((item, index) => {
						return (
							<PlayListPage key={index} data={{ goodsName: item.goodsName, time: item.deliveryBeginDate + '至' + item.deliveryEndDate, quie: item.quantity }} />
						)
					})
				}
			</View>
		)
	} else {
		return null;
	}
}
